﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Bzure.Common.Core;

namespace Bzure.Mvc.Html
{
    public static class ThemeUrlHelper
    {
        public static string ThemeContent(this UrlHelper helper, string url)
        {
            if (url.IsNullOrEmpty())
                return url;
            string s = helper.Content(url);
            return ThemeHelper.CreateThemeViewPath(Actor.Me.ThemeName, null, s);
        }
        public static string ThemeAreaContent(this UrlHelper helper, string AreaName, string url)
        {
            if (url.IsNullOrEmpty())
                return url;
            string s = helper.Content(url);
            return ThemeHelper.CreateThemeViewPath(Actor.Me.ThemeName, AreaName, s);
        }
        public static string GenericThemeContent(this UrlHelper helper, string url)
        {
            if (url.IsNullOrEmpty())
                return url;
            string s = helper.Content(url);
            return ThemeHelper.CreateGenericThemeViewPath(null, s);
        }
        public static string GenericThemeAreaContent(this UrlHelper helper, string AreaName, string url)
        {
            if (url.IsNullOrEmpty())
                return url;
            string s = helper.Content(url);
            return ThemeHelper.CreateGenericThemeViewPath(AreaName, s);
        }
    }
}
